<?php
/*********************************
 * DECLARE SYSTEM CONFIGURATIONS *
 ********************************/
// Define separators
defined('DS') || define('DS', DIRECTORY_SEPARATOR);
defined('PS') || define('PS', PATH_SEPARATOR);

// Define path to directories
defined('ROOT_DIR') || define('ROOT_DIR', str_replace(DS, '/', dirname(dirname(__FILE__)))); 
defined('APPLICATION_DIR') || define('APPLICATION_DIR', ROOT_DIR.'/application');
defined('DATA_DIR') || define('DATA_DIR', ROOT_DIR.'/data');
defined('LIBRARIES_DIR') || define('LIBRARIES_DIR', ROOT_DIR.'/libraries');
defined('PUBLIC_DIR') || define('PUBLIC_DIR', ROOT_DIR.'/public');

// Ensure libraries/ is on include_path
set_include_path(implode(PS, array(realpath(LIBRARIES_DIR), get_include_path())));

//Include common libs
include_once('Utils.php');

/***************************
 * RUN CONSOLE APPLICATION *
 ***************************/

// change the following paths if necessary
$yiic=LIBRARIES_DIR.'/yii/yiic.php';
$config=APPLICATION_DIR.'/config/console.php';
require_once($yiic);